package com.factory;

public class ShapeFactory {
	
	public static final String CIRCLE = "CIRCLE";
	public static final String RECTANGLE = "RECTANGLE";
	public static final String SQUARE = "SQUARE";
	
	public Shape getShape(String shapeType) {
		if (shapeType == null)
			return null;
		
		if (shapeType.equalsIgnoreCase(CIRCLE))
			return new Circle();
		if (shapeType.equalsIgnoreCase(RECTANGLE))
			return new Rectangle();
		if (shapeType.equalsIgnoreCase(SQUARE))
			return new Square();
		
		return null;
	}
}
